import {
    inject,
    observer
} from 'mobx-react'

import {
    WeaDialog,
    WeaRightMenu
} from 'ecCom'

import FormInfo from './FormInfo';
@inject('hrmSecondaryVerify')
@observer
export default class MainDialog extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        const {
            hrmSecondaryVerify
        } = this.props, {
            mainDialog,
            closeDialog,
            buttons,
            style,
            dropMenuDatas,
        } = hrmSecondaryVerify, {
            title,
            visible,
        } = mainDialog;

        return (
            <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@e65k7o`}
                title={title}
                icon="icon-coms-hrm"
                iconBgcolor="#217346"
                visible={visible}
                hasScroll={true}
                onCancel={() => closeDialog()}
                buttons={buttons}
                style={style}
            >
               <WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@15bhw7`} datas={dropMenuDatas}>
                    {visible && <FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@57tses`} />}
                </WeaRightMenu>
            </WeaDialog>
        )

    }
}